#!/usr/bin/python
# -*- coding: utf-8 -*-

import itchat, re
from itchat.content import *

@itchat.msg_register([TEXT])
def text_reply(msg):
    match = re.search('年', msg['Text'])
    if match:
        itchat.send(['新年快乐!'], msg['FormUserName'])

itchat.auto_login(enableCmdQR=True)
itchat.run()

